package cn.vawn.medical.mapper;

import cn.vawn.medical.entity.Uniterm;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.Date;
import java.util.List;

public interface UnitermMapper {

	/**
	 * 查询机构单项
	 * @param name
	 * @param organizationId
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	List<Uniterm> searchUniterm(@Param("name") String name,
								@Param("organizationId") Integer organizationId,
								@Param("startTime") Date startTime,
								@Param("endTime") Date endTime);

	/**
	 * 修改单项状态
	 * @param uniterm
	 */
	@Update("UPDATE UNITERM SET IS_HOME_STATISTICS = #{isHomeStatistics}, UPDATED_TIME = #{updatedTime}, UPDATED_BY = #{updatedBy} WHERE Id = #{id}")
	void changeIsHomeStatistics(Uniterm uniterm);
}
